package com.example.mytips.utils;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.apache.http.util.TextUtils;
import org.jetbrains.annotations.NotNull;

public class MyAnAction extends AnAction {

    ///子类实现
    public String getTemplatePath(){
        return null;
    }

    @Override
    public void actionPerformed(@NotNull AnActionEvent event) {
        assert !TextUtils.isEmpty(getTemplatePath());
        String className = SelectFileInfo.getFileName(event);
        if (TextUtils.isEmpty(className)) {
            return;
        }
        TextInsertUtil.insertString(event, getTemplatePath(),className);
    }
}
